//
//  presentVC.m
//  Notification
//
//  Created by Apple on 2017/3/24.
//  Copyright © 2017年 Apple. All rights reserved.
//

#import "presentVC.h"

@interface presentVC ()

@end

@implementation presentVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"模态";
    self.view.backgroundColor = [UIColor whiteColor];
    
    UILabel*lab = [[UILabel alloc]initWithFrame:self.view.frame];
    lab.textAlignment = NSTextAlignmentCenter;
    lab.text = @"模态跳转";
    lab.font = [UIFont systemFontOfSize:30];
    lab.textColor = [UIColor blackColor];
    [self.view addSubview:lab];
    
    UIButton*but = [UIButton buttonWithType:UIButtonTypeCustom];
    but.frame = CGRectMake(10, 30, 80, 40);
    [but setTitle:@"返回" forState:UIControlStateNormal];
    [but setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    but.layer.borderWidth = 1;
    but.layer.borderColor = [UIColor blackColor].CGColor;
    but.backgroundColor = [UIColor whiteColor];
    [but addTarget:self action:@selector(returnLast) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:but];
}
-(void)returnLast{
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
